Normal distribution & central limit theorem

combs = 
  CombSet(
  c(-1,1),
  4,
  rep = T,
  ord = T
)

combs %>% 
  rowMeans() %>% 
  table()
## .
##   -1 -0.5    0  0.5    1 
##    1    4    6    4    1
combs = CombSet(
  c(-1,1),
  16,
  rep = T,
  ord = T
)

combs.means = 
  combs %>% 
  rowMeans()

h.breaks = seq(-1.01,1.01, length.out = 1+length(unique(combs.means)))
combs.means %>% 
  hist(breaks = h.breaks,
     freq = F)

curve(dnorm(x,sd = sd(combs.means)), add = T)

Galton Board

Linear regression model

Modeling workflow

Define model

Prior predictive check

Fitting

Posterior predictive check

Splines